package com.ch3cooh.server2.service;

import com.ch3cooh.api.ApiResult;
import com.ch3cooh.api.UserService;
import com.ch3cooh.rpc.util.ScannerUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    Environment env;

    @Override
    public Boolean login() {
        System.out.println("调用了" + env.getProperty("spring.application.name") +": login()");
        return true;
    }

    @Override
    public String msg(String msg) {
        return "来自sever-2: " + msg;
    }

    @Override
    public ApiResult testResult(Integer data) {
        return ApiResult.success(data);
    }

}
